package com.me.helper;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;

public class PreferencesData {

	private static  String PREFS_NAME = "dataGameHappyBugs";
	private static  String BOOL_REMEMBERSOUND = "rememberSound";
	private static  String BOOL_REMEMBERMUSIC = "rememberMusic";
	public static Preferences prefs = Gdx.app.getPreferences(PREFS_NAME);
	
	
//	public static void setUserName(String UserName, int range){
//		prefs.putString("USER_NAME" +range, UserName);
//		prefs.flush();
//	}
//	
//	public static String getUserName(int range){
//		return prefs.getString("USER_NAME" + range,"Guest");
//	}
	
	public static void setHighScore(int iScore, int range){
		prefs.putInteger("HIGH_SCORE" +range, iScore);
		prefs.flush();
	}
	
	public static int getHighScore(int range){
		return prefs.getInteger("HIGH_SCORE" + range,0);
	}
	
	public static void setBoolRememberSound(Boolean bRememSound){
		prefs.putBoolean(BOOL_REMEMBERSOUND, bRememSound);
		prefs.flush();
	}
	
	public static Boolean getBoolRememberSound(){
		return prefs.getBoolean(BOOL_REMEMBERSOUND, true);
	}
	
	public static void setBoolRememberMusic(Boolean bRememSound){
		prefs.putBoolean(BOOL_REMEMBERMUSIC, bRememSound);
		prefs.flush();
	}
	
	public static Boolean getBoolRememberMusic(){
		return prefs.getBoolean(BOOL_REMEMBERMUSIC, true);
	}
	
}
